Skip to content

Conversation

thurstond
Copy link
Contributor

This test has been flaky failing on sanitizer-ppc64le-linux since at least 9 days ago (https://lab.llvm.org/buildbot/#/builders/72/builds/15257), but the exact cause is unclear because the only output is that assert(res == 0 || res == ENOENT); failed.

To aid debugging, this patch prints out the result of the getpwnam_r call.

This test has been flaky failing on sanitizer-ppc64le-linux since at least 9 days ago (https://lab.llvm.org/buildbot/#/builders/72/builds/15257), but the exact cause is unclear because the only output is that `assert(res == 0 || res == ENOENT);` failed.

To aid debugging, this patch prints out the result of the `getpwnam_r` call.
@llvmbot
Copy link
Member

llvmbot commented Oct 7, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Thurston Dang (thurstond)

Changes

This test has been flaky failing on sanitizer-ppc64le-linux since at least 9 days ago (https://lab.llvm.org/buildbot/#/builders/72/builds/15257), but the exact cause is unclear because the only output is that assert(res == 0 || res == ENOENT); failed.

To aid debugging, this patch prints out the result of the getpwnam_r call.


Full diff: https://github.com/llvm/llvm-project/pull/162217.diff

1 Files Affected:

  • (modified) compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp (+2)
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp
index c0d6cfea1fbef..4c6cffee05e51 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp
@@ -14,6 +14,8 @@ int main(void) {
   struct passwd *pwdres;
   char buf[10000];
   int res = getpwnam_r("no-such-user", &pwd, buf, sizeof(buf), &pwdres);
+  fprintf(stderr, "Result: %d\n", res);
+  fflush(stderr);
   assert(res == 0 || res == ENOENT);
   assert(pwdres == 0);
   return 0;

@thurstond thurstond merged commit ea02eda into llvm:main Oct 7, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants